﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace TravelServer.Models
{
    public class TouristRoutePictures
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [Required]
        [MaxLength(100)]
        public string? Url { get; set; }

        //外键配置
        [ForeignKey("TouristRouteId")]//约定写法对应TouristRoute的主键
        public Guid TouristRouteId { get; set; }

        //导航属性
        public TouristRoute? TouristRoute { get; set; }
    }
}
